]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extensionSystem: Disable extension before unloading stylesheet
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 13 May 2020 18:10:56 +0000 (20:10 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 13 May 2020 18:10:56 +0000 (20:10 +0200)
Removing a stylesheet from the theme will trigger a style update. There's
little point in updating the extension actors that are about to be destroyed
(hopefully), so call the extension's disable() function first.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2757

js/ui/extensionSystem.js

index 1a34f19e9e384b1d352207ea78eba9e7e1f80ba3..5a50b473ac2bdb25ec1a7f47cbd2d00ebf889800 100644 (file)
@@ -102,18 +102,18 @@ var ExtensionManager = class {
             }
         }
 
-        if (extension.stylesheet) {
-            let theme = St.ThemeContext.get_for_stage(global.stage).get_theme();
-            theme.unload_stylesheet(extension.stylesheet);
-            delete extension.stylesheet;
-        }
-
         try {
             extension.stateObj.disable();
         } catch (e) {
             this.logExtensionError(uuid, e);
         }
 
+        if (extension.stylesheet) {
+            let theme = St.ThemeContext.get_for_stage(global.stage).get_theme();
+            theme.unload_stylesheet(extension.stylesheet);
+            delete extension.stylesheet;
+        }
+
         for (let i = 0; i < order.length; i++) {
             let otherUuid = order[i];
             try {